<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<!-- suppress ThymeleafVariablesResolveInspection -->

<section class="sidebar" style="height: 330px; overflow: hidden; width: auto;">
    <!-- Sidebar user panel -->
    <div class="user-panel hidden-xs">
        <div class="pull-left image">
            <a href="javascript:;" class="addtabsit"><img class="img-circle" th:src="${DB_USER.avatar}"></a>
        </div>
        <div class="pull-left info">
            <p th:text="${DB_USER.nickname}"></p>
            <i class="fa fa-circle text-success"></i> <i>在线</i></div>
    </div>

    <!-- search form -->
    <form action="" method="get" class="sidebar-form" onsubmit="return false;">
        <div class="input-group">
            <input type="text" name="q" class="form-control" placeholder="搜索菜单">
            <span class="input-group-btn">
                                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                                </button>
                            </span>
            <div class="menuresult list-group sidebar-form hide" style="width: 210px;">
            </div>
        </div>
    </form>
    <!-- /.search form -->

    <!-- sidebar menu: : style can be found in sidebar.less -->
    <!--如果想始终显示子菜单,则给ul加上show-submenu类即可-->
    <ul class="sidebar-menu">
        <li class="header">站内导航</li>
        <li th:each="pair:${menus}" class="treeview">
            <a href="javascript:;" th:addtabs="${pair.key.id}" url="javascript:;"><i th:class="${pair.key.icon}"></i> <span th:text="${pair.key.title}"></span></a>
            <ul class="treeview-menu" >
                <li th:each="menu:${pair.value} " class="">
                    <a th:if="${menu.status==1}" th:href="${menu.url}" th:addtabs="${menu.id}" th:url="${menu.url}"><i th:class="${menu.icon}"></i> <span  th:text="${menu.title}"></span> </a>
                </li>
            </ul>
        </li>

    </ul>
</section>
</html>
